package cn.tank.data.sync.kafka.common;

/************************************************
 * @Description:自定义kafka配置信息
 * @Author: tancyong
 * @Version: 1.0
 ************************************************/
public class KafkaProperties {

    /** 服务地址 */
    private String kafkaServer;
    /** 缓冲存储 32M */
    private long bufferMemory;
    /** 批次的⼤⼩ 16k */
    private Integer batchSize;
    /** 延时时间（同时设置batch.size和 linger.ms,就是哪个条件先满⾜就都会将消息发送出去） */
    private Integer lingerMs;
    /** 重试 */
    private int retries;
    /** 重试间隔时间 */
    private int retriesBackoffMs;
    /** 超时时间（该配置控制客户端等待请求响应的最长时间） */
    private int reqTimeoutMs;
    /** acks */
    private String acks;

    private int warnCost=3000;

    private int timeoutCost=10000;

    public String getKafkaServer() {
        return kafkaServer;
    }

    public void setKafkaServer(String kafkaServer) {
        this.kafkaServer = kafkaServer;
    }

    public long getBufferMemory() {
        return bufferMemory;
    }

    public void setBufferMemory(long bufferMemory) {
        this.bufferMemory = bufferMemory;
    }

    public Integer getBatchSize() {
        return batchSize;
    }

    public void setBatchSize(Integer batchSize) {
        this.batchSize = batchSize;
    }

    public Integer getLingerMs() {
        return lingerMs;
    }

    public void setLingerMs(Integer lingerMs) {
        this.lingerMs = lingerMs;
    }

    public int getRetries() {
        return retries;
    }

    public void setRetries(int retries) {
        this.retries = retries;
    }

    public int getRetriesBackoffMs() {
        return retriesBackoffMs;
    }

    public void setRetriesBackoffMs(int retriesBackoffMs) {
        this.retriesBackoffMs = retriesBackoffMs;
    }

    public int getReqTimeoutMs() {
        return reqTimeoutMs;
    }

    public void setReqTimeoutMs(int reqTimeoutMs) {
        this.reqTimeoutMs = reqTimeoutMs;
    }

    public String getAcks() {
        return acks;
    }

    public void setAcks(String acks) {
        this.acks = acks;
    }

    public int getWarnCost() {
        return warnCost;
    }

    public void setWarnCost(int warnCost) {
        this.warnCost = warnCost;
    }

    public int getTimeoutCost() {
        return timeoutCost;
    }

    public void setTimeoutCost(int timeoutCost) {
        this.timeoutCost = timeoutCost;
    }

    public KafkaProperties(){}

}
